<template>
    <div>
        <div
                v-for="item in autoSelectData[dataType]"
                :key="item.value"
                v-show="item.value === String(value)"
                :label="item.label"
                :value="item.value">
            {{item.label}}
        </div>
    </div>
</template>
<script>
    import {mapState} from 'vuex'

    export default {
        name: 'selectTableDataForm',
        data() {
            return {}
        },
        computed: {
            ...mapState({
                autoSelectData: function (state) {
                    if (!state.common.autoSelectData[this.dataType]) {
                        return {
                            [this.dataType]: []
                        }
                    }
                    return state.common.autoSelectData
                }
            })
        },
        props: {
            dataType: String,
            value: {}
        }
    }
</script>
